<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
	<div class="Wrapper">
		<div>
			<form id="ligerForm" action="">
				<div class="fieldset1 tabel_col clearFix">
					<div class="caption">
						<span class="title">移交详情</span>
					</div>
					<div class="fieldBox col_50">
						<div class="label">合同号</div>
						<div class="field">${mgr.contractNo}
							
							
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">交接单名称</div>
						<div class="field">
								${mgr.arcReceiptName}
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">省公司档案编号</div>
						<div class="field">${mgr.portfolioNumberProvince}
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">总部档案编号</div>
						<div class="field">${mgr.portfolioNumber}
						</div>
					</div>
					<div class="caption">
						<span class="title">权证资料</span>						
					</div>
					<c:forEach items="${mgrList}" var="mgrvo">
					<div class="fieldBox col_100">
						${mgrvo.paySchNo}
						<div style="width: 100%; ">
							 <table style="BORDER-COLLAPSE: collapse;margin-bottom:20px" borderColor=#ECECEC height=40 cellPadding=1 width="100%" align=center border=1> 
							<thead>
								<tr style="background:#E7FEF4">
									<th  style="text-align: center;width:5%;"></th>
									<th  style="text-align: center;width:10%">权证类别</th>
									<th  style="text-align: center;width:25%">权证名称</th>
									<th  style="text-align: center;width:10%">资料类型</th>
									<!-- <th  style="text-align: center;width:10%">是否必须</th> -->
									<th  style="text-align: center;width:10%">存档份数</th>
									<th  style="text-align: center;width:10%">实际移交份数</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${mgrvo.arcMgrDetailList}" var="item" varStatus="status">
								 
									<tr>
										<td  style="text-align: center; height:20px;">${status.index+1}</td>
										<td  style="text-align: center; ">${item.fileFlagNm }</td>
										<td  style="text-align: center; ">${item.fileName }</td>
										<td  style="text-align: center; ">${item.dossierTempNm }</td>
										<%-- <td  style="text-align: center; ">${item.ischoiceNm }</td> --%>
										<td  style="text-align: center; ">
											<c:if test="${item.dossierTemp =='3' and item.filePath != null}">
					               			<a  target="_blank" href="${item.filePath }" >查看</a>
					               			</c:if>
					               			<c:if test="${item.dossierTemp !='3'}">
											${item.dossierCountT }
											</c:if>
										</td>
										<td  style="text-align: center;">
										${item.transferCount }</td>
										<td  style="text-align: center; "></td>
									<tr>
								 
								</c:forEach>
							</tbody>
						</table>
						</div>
					</div>
					</c:forEach>
					<c:if test="${dList != null}">
					<div class="caption">
						<span class="title">结清资料</span>						
					</div>
					<div class="fieldBox col_100">
						
						<div style="width: 100%; ">
							 <table style="BORDER-COLLAPSE: collapse;margin-bottom:20px" borderColor=#ECECEC height=40 cellPadding=1 width="100%" align=center border=1> 
							<thead>
								<tr style="background:#E7FEF4">
									<th  style="text-align: center;width:5%;"></th>
									<th  style="text-align: center;width:10%">权证类别</th>
									<th  style="text-align: center;width:25%">权证名称</th>
									<th  style="text-align: center;width:10%">资料类型</th>
									<th  style="text-align: center;width:10%">要求份数</th>
									<th  style="text-align: center;width:10%">是否必须</th>
									<th  style="text-align: center;width:10%">
									<c:if test="${mgrList[0].transferStatus=='2'}">已归档份数</c:if>
									<c:if test="${mgrList[0].transferStatus=='1'}">归档中份数</c:if>
									</th>									
									<th  style="text-align: center;width:10%">扫描件</th>
									
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${dList}" var="item" varStatus="status">
								<tr>
									<td  style="text-align: center; height:20px;">${status.index+1}</td>
									<td  style="text-align: center; ">${item.fileFlagNm }</td>
									<td  style="text-align: center; ">${item.fileName }</td>
									<td  style="text-align: center; ">${item.dossierTempNm }</td>
									<td  style="text-align: center; ">${item.dossierCount }</td>
									<td  style="text-align: center; ">${item.ischoiceNm }</td>
									<td  style="text-align: center;">
									${item.transferNumber }</td>
									<td  style="text-align: center; ">
									<c:if test="${item.dossierTemp !='3' and item.eleId != null }">
			               			<div  class="upfiles" id="${item.id}" pkId="${item.eleId}"  style="text-align:left"></div>
									</c:if>
									</td>
								<tr>
								</c:forEach>
							</tbody>
						</table>
						</div>
					</div>
					</c:if>				
					
					<div class="caption">
						<span class="title">邮寄记录</span>
					</div>
					<div class="fieldBox col_100">
						<div style="width: 100%; ">
							 <table style="BORDER-COLLAPSE: collapse;margin-bottom:20px" borderColor=#ECECEC height=40 cellPadding=1 width="100%" align=center border=1> 
							<thead>
								<!-- 
								<tr style="background:#E7FEF4">
									<th colspan="5"  style="text-align: center;">客户经理邮寄信息</th>
									<th colspan="5"  style="text-align: center;">省公司邮寄信息</th>
									<th colspan="1"  style="text-align: center;">流程信息</th>
								</tr>
								 -->
								<tr style="background:#E7FEF4">
									<th  style="text-align: center;width:5%"></th>
									<th  style="text-align: center;width:9%">地址类型</th>
									<!-- <th  style="text-align: center;width:9%">邮寄人类型</th> -->
									<th  style="text-align: center;width:9%">收件人(工号)</th>
									<th  style="text-align: center;width:9%">收件人(姓名)</th>
									<th  style="text-align: center;width:9%">联系电话</th>
									<th  style="text-align: center;width:6%">邮寄方式</th>
									<th  style="text-align: center;width:9%">邮寄公司</th>
									<th  style="text-align: center;width:9%">邮寄单号</th>
									<!-- <th  style="text-align: center;width:9%">邮寄时间</th> -->
									<th  style="text-align: center;width:15%">地址</th>
									<th  style="text-align: center;width:9%">备注</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${plist}" var="item" varStatus="status">
								<tr>
									<td  style="text-align: center; height:20px;">${status.index+1}</td>
									<td  style="text-align: center; ">${item.arcAppBussTypeNm }</td>
									<%-- <td  style="text-align: center; ">${item.sendPorsonTypeNm }</td> --%>
									<td  style="text-align: center; ">${item.idCard }</td>
									<td  style="text-align: center; ">${item.recipient }</td>
									<td  style="text-align: center; ">${item.mobile }</td>
									<td  style="text-align: center; ">${item.sendTypeNm }</td>
									<td  style="text-align: center; ">${item.sendCompanyNm }</td>
									<td style="text-align: center; ">${item.sendNum }</td>
									<%-- <td  style="text-align: center; ">${item.sendDate }</td> --%>
									<td style="text-align: center; ">${item.sendAddr }</td>
									<td  style="text-align: center; ">${item.remark }</td>
								<tr>
								</c:forEach>
							</tbody>
						</table>
						</div>
					</div>
					
				</div>
				
				
			</form>
		</div>
	</div>
	<jsp:include page="../../system/sysUlFilesRec/sysUlFileRecList2.jsp" flush="true" >
			        
			            <jsp:param name="fflag" value="0"/>
			        
			            <jsp:param name="tabNm" value="ARC_MGR_DETAIL"/>
    </jsp:include>
	<script type="text/javascript">
	 	
		var grid;
		
		$(function() {
			$("#ligerForm").ligerForm({
				validate: true
			});
			
			//initGrid();//初始化交接单明细
	    });
		
		
		//保存
		function save(){
			
			var ligerForm = liger.get("ligerForm");
			if (!ligerForm.valid()) {
				$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO,SQ_type: "warning"});
				return false; 
			}
			
			
			var data = ligerForm.getData();//主表数据
			//data["cjson"] = '${cjson}';
			//data["pjson"] = '${pjson}';
			//明细数据JSON.stringify(grid.getData());
			//alert(JSON.stringify(data));
			//alert(JSON.stringify(grid.getData()));
			//alert(JSON.stringify($("#ligerForm").serialize()));
			//console.log((JSON.stringify(data)));
			
			var wait_dialog = null;
			
			$.ajax({
				type: 'post',
				dataType: 'json',
				data: data,
				url: '<%=path%>/archive/arcTransferMain/modifyFlowHC.do?id=${id}&paySchNo=${paySchNo}',
				beforeSend: function(){
					wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
				},success:function(msg){
					wait_dialog.close();
					if(msg.success == 1){
						$.ligerDialog.SQalert({content: msg.info,SQ_type: "success"});
							//if(id == "") {
								//Remove_navTab();//新增，关闭当前页面
							//}
						window.location.reload();
					}else{
						$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
					}
				},error:function (XMLHttpRequest, textStatus, errorThrown) { 
					wait_dialog.close();
					$.ligerDialog.SQalert({content: "网络错误，请稍后重试",SQ_type: "error"});
				} 
			});
		}
		
	</script>
</body>
</html>